package com.xiaoli.algebra;

// $ANTLR 3.4 C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g 2012-06-06 17:33:53

import org.antlr.runtime.CharStream;
import org.antlr.runtime.Lexer;
import org.antlr.runtime.MismatchedSetException;
import org.antlr.runtime.NoViableAltException;
import org.antlr.runtime.RecognitionException;
import org.antlr.runtime.RecognizerSharedState;

@SuppressWarnings({"all", "warnings", "unchecked"})
public class AlgebraLexer extends Lexer {
    public static final int EOF=-1;
    public static final int T__5=5;
    public static final int T__6=6;
    public static final int T__7=7;
    public static final int T__8=8;
    public static final int INT=4;

    // delegates
    // delegators
    public Lexer[] getDelegates() {
        return new Lexer[] {};
    }

    public AlgebraLexer() {} 
    public AlgebraLexer(CharStream input) {
        this(input, new RecognizerSharedState());
    }
    public AlgebraLexer(CharStream input, RecognizerSharedState state) {
        super(input,state);
    }
    public String getGrammarFileName() { return "C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g"; }

    // $ANTLR start "T__5"
    public final void mT__5() throws RecognitionException {
        try {
            int _type = T__5;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:2:6: ( '*' )
            // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:2:8: '*'
            {
            match('*'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "T__5"

    // $ANTLR start "T__6"
    public final void mT__6() throws RecognitionException {
        try {
            int _type = T__6;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:3:6: ( '+' )
            // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:3:8: '+'
            {
            match('+'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "T__6"

    // $ANTLR start "T__7"
    public final void mT__7() throws RecognitionException {
        try {
            int _type = T__7;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:4:6: ( '-' )
            // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:4:8: '-'
            {
            match('-'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "T__7"

    // $ANTLR start "T__8"
    public final void mT__8() throws RecognitionException {
        try {
            int _type = T__8;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:5:6: ( '/' )
            // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:5:8: '/'
            {
            match('/'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "T__8"

    // $ANTLR start "INT"
    public final void mINT() throws RecognitionException {
        try {
            int _type = INT;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:10:5: ( ( '0' .. '9' ) )
            // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:
            {
            if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "INT"

    public void mTokens() throws RecognitionException {
        // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:1:8: ( T__5 | T__6 | T__7 | T__8 | INT )
        int alt1=5;
        switch ( input.LA(1) ) {
        case '*':
            {
            alt1=1;
            }
            break;
        case '+':
            {
            alt1=2;
            }
            break;
        case '-':
            {
            alt1=3;
            }
            break;
        case '/':
            {
            alt1=4;
            }
            break;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
            {
            alt1=5;
            }
            break;
        default:
            NoViableAltException nvae =
                new NoViableAltException("", 1, 0, input);

            throw nvae;

        }

        switch (alt1) {
            case 1 :
                // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:1:10: T__5
                {
                mT__5(); 


                }
                break;
            case 2 :
                // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:1:15: T__6
                {
                mT__6(); 


                }
                break;
            case 3 :
                // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:1:20: T__7
                {
                mT__7(); 


                }
                break;
            case 4 :
                // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:1:25: T__8
                {
                mT__8(); 


                }
                break;
            case 5 :
                // C:\\cygwin\\home\\yywill\\workspaces\\antlr\\Algebra.g:1:30: INT
                {
                mINT(); 


                }
                break;

        }

    }


 

}